The present invention relates to a method of inputting a document image, and in particular, to an image input apparatus having a function in which in a case where a document image including a character area and a photograph area therein is to be represented in a binary notation through a binarization, an operation to judge whether or not a portion of the image requires a dither process is achieved in a real-time fashion so as to effect an appropriate processing.
Conventionally, for an apparatus which determines in a real-time fashion whether a portion of a document image belongs to an area (to be referred to as a halftone domain herebelow) requiring a dither process or to an area (to be referred to as a binary domain herebelow) not requiring the dither processing, there has been proposed a method in which the image is subdivided into small parts each called a mesh comprising 3.times.3 pixels, 5.times.5 pixels, or the like so as to attain a characteristic quantity from the density of an internal portion of the mesh, thereby determining the area depending on the value of the characteristic quantity.
Incidentally, the operation to determine whether a portion of an image belongs to a halftone domain or to a binary domain is to be called a domain decision or recognition herebelow.
As a conventional example, in the conventional example 1 (JP-A-58-3374), there has been described a method in which the density difference between the maximum value and the minimum value of density of the pixels in a mesh is assigned as a characteristic quantity for the mesh.
In this method, it is assumed that a portion of which the density difference is equal to or more than a predetermined value belongs to the binary domain and that a portion of which the density difference is below the predetermined value belongs to the halftone domain, thereby accomplishing the domain decision or recognition for each mesh. In addition, there has been described a method in which after the domain recognition is carried out depending on the density difference; thereafter depending on the recognition results of meshes located in the periphery thereof, the recognition result of each mesh is rewritten, thereby attaining the final result of the domain recognition. Incidentally, the operation to rewrite a recognition result once obtained, as described above, according to the situation of the periphery is to be called a rewriting process herebelow.
In the conventional example 1, attention has been given to a fact that the density greatly varies in an edge portion or a contour portion of a character.
However, only the edge portion of the character is regarded as the binary domain according to this method, namely, the other portions are judged to belong to the halftone domain. As a result, this method cannot be applied to a purpose in which a document image is to be separated into binary and halftone domains.
In addition, according to a conventional example 2 (JP-A-60-196068), there has been proposed a method in which a binarization of an image is effected depending on two kinds of threshold values so as to generate two binary images such that a difference between the binary images is attained for each mesh, thereby producing a characteristic quantity. In this method, a portion of the image is regarded as a binary domain if the characteristic quantity is less than threshold level; otherwise, the portion is considered to be a halftone domain. In addition, the rewriting process is further accomplished in the same fashion as the conventional example 1.
In this method, it is assumed that the pixels of the binary domain possess only the density associated with white or black and that those of the halftone domain have the grey density.
However, a photograph area belonging to the halftone domain also includes a pure white portion or a pure black portion, whereas also in the binary domain, the density of pixels on an edge portion of a character may take a halftone level. Furthermore, since a character written by use of a pencil has a thin color, the density thereof becomes to take an intermediate value. Consequently, according to this method, the recognition accuracy or precision is low for for an image including the character written in a thin color and the photograph area having a high contrast.
On the other hand, according to a conventional example 3 (JP-A-61-3568), there has been described a method in which an image is subdivided into blocks each comprising a plurality of pixels. For each block, there is counted the number of pixels for which the density difference with respect to the neighboring pixel is equal to or more than a particular value. If the number is not below a predetermined value, the entire block is assumed to be a binary domain; otherwise, the block is recognized to be a halftone domain.
However, even in a photograph area, the change in the density is great, for example, in an edge portion of an object. Moreover, also in a character area, since for a document written by use of a pencil, the color of characters is thin and the contour or edge thereof becomes to be obscure, the change in the density is small even in the edge portion. As a result, the recognition precision of this method is reduced for an image including the character and photograph areas above.
In the prior art technology, according to the methods of the conventional examples 1 and 2 in which the domain recognition is conducted for each mesh, only quite local data such as 3.times.3 pixels are used for the domain recognition. However, in general, since the individual pixel is of a small size, the mesh occupies a very small area.
For example, in an image associated with a resolution of 200 dots/inch (8 lines/mm) generally adopted in a facsimile apparatus, the area occupied by a mesh including 3.times.3 pixels is at most 0.4.times.0.4 mm.sup.2. In a high-precision image with a resolution of 400 dots/inch, the area is at most 0.2.times.0.2 mm.sup.2. It is difficult to appropriately recognize, only from the data of this range, whether the portion belongs to the binary domain or to the halftone domain.
However, in order to attain a large mesh area, if the number of pixels is merely increased for each mesh, the processing is only complicated and recognition precision cannot be improved.
For example, in the method of the conventional example 1 where the domain recognition is achieved depending on the density difference in a mesh, both in the binary domain and in the halftone domain, the maximum value of the density difference in a mesh increases as the mesh area becomes greater. As a result, the difference between characteristic quantities adopted to discriminate the binary domain from the halftone domain becomes to be smaller.
In addition, according to the method of the conventional example 2 where a comparison is effected on the binary results attained through a binarization based on two kinds of threshold values, as the mesh area increased, the difference between the two binary images becomes greater regardless of the areas.
However, in a case of a small mesh, conditions of many meshes are required to be referenced in order to effect the rewriting process.
For example, let us consider a case where the domain recognition is carried out on an image sampled with a resolution of 200 dots/inch (8 lines/mm) by use of meshes each including 3.times.3 pixels. In this situation, only to reference the state of the periphery of 3.times.3 mm of the mesh, it is required to examine 64 meshes. However, there exist 2.sup.64 kinds of recognition results for the examination of the 64 meshes. In consequence, a high-speed processing, particularly, a real-time processing cannot be easily achieved.
In contrast thereto, according to the conventional example 3, the state of a large region can be referenced without increasing the processing amount.
However, when only the density difference between pixels is adopted as the characteristic quantity, merely the edge portion of a line graphic image like a character can be extracted as described above.
Consequently, in order to separate the area according to this method, it is necessary to rewrite the periphery of a block assumed to be a binary domain into a binary domain in a large range.
The processing above is to be called an expansion processing of a binary domain herebelow. However, as described above, the halftone domain also includes a portion where the density abruptly changes. FIG. 3a shows an example of the domain recognition result in such a case. In this figure, reference numeral 10 denotes a portion judged to be an edge portion of a character according to the edge extract processing, whereas reference numeral 20 indicates a portion which is, although actually a portion of the photograph, recognized to be an edge portion of a character. The hatched portions (such as the portions 10 and 20) are those recognized to belong to the binary domain. In addition, a square part 30 enclosed with bold frame lines is an area to be regarded as a halftone domain, for example, of a photograph. In the situation of FIG. 3a, it is difficult to discriminate the edge portion 10 of the pattern from the portion which is, although actually an area to be regarded as a halftone domain, recognized to be a binary domain.
In order to overcome this difficulty, the expansion processing of the binary domain is conducted on the state of FIG. 3a, thereby attaining a result of FIG. 3b. Here, reference numeral 11 designates a portion obtained by expanding the portion 10 of FIG. 3a, whereas reference numeral 21 results from the expansion effected on the portion 20 of FIG. 3a. That is, the region of the hatched portion 11 is recognized to be a binary domain, and at the same time, the region 20 mistakenly regarded as a binary domain is also expanded such that the range of the hatched portion 21 is recognized to be a binary domain.
In addition, as shown in FIG. 3a, a halftone domain 30 is contained in a binary domain in many cases. In this case, however, the pattern is seldom located so as to extend in the entire region of the binary domain. Consequently, even when an expansion processing is carried out on the edge portion 10, the overall region of the binary domain cannot be recognized to be a binary domain.
The area can be separated by use of the expansion of an edge portion only in a case where, for example, a binary domain 40 exists in a portion of a halftone domain 31 and the pattern is drawn in the entire region thereof as shown in FIG. 3c.
In this method, the rewriting process is accomplished through at least two stages of processing. However, the processing of each stage is required to be repeatedly achieved until the recognition result becomes to be fixed in the entire image.
In consequence, the final result of the domain recognition is attained only after the data associated with the overall image is inputted. That is, for example, in a case where a binary domain of an image is binarized by use of a fixed threshold value and a halftone domain thereof is subjected to a dither process, two kinds of binary images are required to be kept stored until the domain recognition is finished, which necessitates a memory of a large capacity.